class UrlMappings {
    static mappings = {
        "/$controller/$action?/$id?" {
            constraints {
                // apply constraints here
            }
        }
        "/"(view: "/index")
        "500"(view: '/error')

        "/timeline/cnorris" {
            controller = "post"
            action = "timeline"
            id = "cnorris"
        }

        "/users/$id" {
            controller = "post"
            action = "timeline"
        }
    }
}